package com.core.a;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Sunil
 */
public class Sample {

    public static void main(String[] args) {
        Triangle triangle = new Triangle();
        Circle circle = new Circle();
        Shape shape = new Triangle();
        
        Manufacture m = new Manufacture();
        List<Triangle> l = m.formatDraw(triangle); 
        
        System.out.println(l.toString());
        
    }
}

class Manufacture {

    public<T extends Shape> List<T> formatDraw(T t) {
        System.out.println("-----------------");
        t.draw();
        System.out.println("------------------");

        List<T> l = new ArrayList<T>();
        l.add(t);
        l.add(t);
        return l;
    }
}
